<html>
<head>
  <title></title>
  <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
  <script src="//cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js"></script>
  <script src="vertx-eventbus.js"></script>
</head>

<style>
  .news {
    font-size: 20pt;
  }
</style>

<body>

<div class="news">Latest news:</div>
<br>

<div id="status" class="news"></div>

<script>
  var eb = new EventBus("http://localhost:8080/eventbus");

  eb.onopen = function () {
    eb.registerHandler("news-feed", function (err, msg) {
      var str = "<code>" + msg.body + "</code><br>";
      $('#status').prepend(str);
    })
  }

</script>

</body>
</html>
